libxl: turn two malloc's to libxl__malloc
authorWei Liu <wei.liu2@citrix.com>
Tue, 14 Jul 2015 16:41:05 +0000 (17:41 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 15 Jul 2015 09:56:04 +0000 (10:56 +0100)
commit94ef16a42a21ab166be470fd6fca5c4acf896311
tree76c8e90d3d11a6f86cc2cc1d71cc0636263c8eae
parent048f1a170afcb6ee246cf2e074603435ed368d83
libxl: turn two malloc's to libxl__malloc

One is to combine malloc + libxl__alloc_failed. The other is to avoid
dereferencing NULL pointer in case of malloc failure. Also use gc for
memory allocation and remove free() in second case.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_aoutils.c
tools/libxl/libxl_dm.c